﻿<?php
$email = "test@gmail.com";
echo preg_match("/^[\w.]+@[\w]+(.[\w]+).[a-z]{2,3}/i", $email);
?>